
import 'package:flutter/material.dart';
import 'package:icooker/model/meaildetail/MealDetailData.dart';
import 'package:flutter_icons/flutter_icons.dart';

/// 底部菜单
class BottomMenu extends StatelessWidget {
  MealDetailData data;

  BottomMenu(this.data, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return BottomSheet(
      builder: (BuildContext context) {
        return Container(
          height: 55,
          color: Colors.white,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              TextButton(
                  onPressed: () {},
                  child: Row(
                    children: [
                      Icon(
                        FontAwesome.commenting_o,
                        color: Colors.blue,
                      ),
                      SizedBox(width: 2.0),
                      Text("${data!.viewed_amount}",
                          style: TextStyle(color: Colors.blueGrey)),
                    ],
                  )),
              TextButton(
                  onPressed: () {},
                  child: Row(
                    children: [
                      Icon(
                        Icons.favorite,
                        color: Colors.red,
                      ),
                      SizedBox(width: 2.0),
                      Text("${data!.favor_amount}",
                          style: TextStyle(color: Colors.blueGrey)),
                    ],
                  )),
              TextButton(
                  onPressed: () {},
                  child: Row(
                    children: [
                      Icon(
                        FontAwesome.thumbs_up,
                        color: Colors.green,
                      ),
                      SizedBox(width: 2.0),
                      Text("${data!.favor_amount}",
                          style: TextStyle(color: Colors.blueGrey)),
                    ],
                  )),
              TextButton(
                  onPressed: () {},
                  child: Row(
                    children: [
                      Icon(
                        Icons.visibility,
                        color: Colors.orange,
                      ),
                      SizedBox(width: 2.0),
                      Text(
                        "${data!.zan_num}",
                        style: TextStyle(color: Colors.blueGrey),
                      ),
                    ],
                  ))
            ],
          ),
        );
      },
      onClosing: () {},
    );
  }
}